home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2005 June (DVD) / DPPRO0605DVD.iso / Install / program files / Borland / BDS / 3.0 / Demos / Delphi.Net / CLR / CDSBrowser / NestedTables.xml < prev    next >
Encoding:
Extensible Markup Language  |  2004-10-22  |  15.9 KB  |  197 lines

  1. <?xml version="1.0" standalone="yes"?>
  2. <DATAPACKET Version="2.0">
  3.   <METADATA>
  4.     <FIELDS>
  5.       <FIELD attrname="AREAID" fieldtype="i2">
  6.         <PARAM Name="ORIGIN" Value="BUGDATA.AREAID" Roundtrip="True"/>
  7.       </FIELD>
  8.       <FIELD attrname="ATTACHMENT" fieldtype="string" WIDTH="52">
  9.         <PARAM Name="ORIGIN" Value="BUGDATA.ATTACHMENT" Roundtrip="True"/>
  10.       </FIELD>
  11.       <FIELD attrname="BUILD_NO" fieldtype="string" WIDTH="15">
  12.         <PARAM Name="ORIGIN" Value="BUGDATA.BUILD_NO" Roundtrip="True"/>
  13.       </FIELD>
  14.       <FIELD attrname="DATA_TYPE" fieldtype="string" WIDTH="1">
  15.         <PARAM Name="ORIGIN" Value="BUGDATA.DATA_TYPE" Roundtrip="True"/>
  16.       </FIELD>
  17.       <FIELD attrname="DATE_REPORTED" fieldtype="dateTime">
  18.         <PARAM Name="ORIGIN" Value="BUGDATA.DATE_REPORTED" Roundtrip="True"/>
  19.       </FIELD>
  20.       <FIELD attrname="DEFECT_NO" fieldtype="i4">
  21.         <PARAM Name="PROVFLAGS" Value="7" Type="i4" Roundtrip="True"/>
  22.         <PARAM Name="ORIGIN" Value="BUGDATA.DEFECT_NO" Roundtrip="True"/>
  23.       </FIELD>
  24.       <FIELD attrname="DESCRIPTION" fieldtype="bin.hex" SUBTYPE="Text" WIDTH="8">
  25.         <PARAM Name="ORIGIN" Value="BUGDATA.DESCRIPTION" Roundtrip="True"/>
  26.       </FIELD>
  27.       <FIELD attrname="PLATFORM" fieldtype="i2">
  28.         <PARAM Name="ORIGIN" Value="BUGDATA.PLATFORM" Roundtrip="True"/>
  29.       </FIELD>
  30.       <FIELD attrname="PROJECT" fieldtype="i2">
  31.         <PARAM Name="ORIGIN" Value="BUGDATA.PROJECT" Roundtrip="True"/>
  32.       </FIELD>
  33.       <FIELD attrname="PUBLISH_VERSION_FIXED" fieldtype="string" WIDTH="10">
  34.         <PARAM Name="ORIGIN" Value="BUGDATA.PUBLISH_VERSION_FIXED" Roundtrip="True"/>
  35.       </FIELD>
  36.       <FIELD attrname="INTERNAL_NO" fieldtype="i4">
  37.         <PARAM Name="ORIGIN" Value="BUGDATA.RAID_NO" Roundtrip="True"/>
  38.       </FIELD>
  39.       <FIELD attrname="REF_NO" fieldtype="i4">
  40.         <PARAM Name="ORIGIN" Value="BUGDATA.REF_NO" Roundtrip="True"/>
  41.       </FIELD>
  42.       <FIELD attrname="RESOLUTION" fieldtype="i2">
  43.         <PARAM Name="ORIGIN" Value="BUGDATA.RESOLUTION" Roundtrip="True"/>
  44.       </FIELD>
  45.       <FIELD attrname="RESOLVED_IN_BUILD" fieldtype="string" WIDTH="15">
  46.         <PARAM Name="ORIGIN" Value="BUGDATA.RESOLVED_IN_BUILD" Roundtrip="True"/>
  47.       </FIELD>
  48.       <FIELD attrname="SEVERITY" fieldtype="string" WIDTH="1">
  49.         <PARAM Name="ORIGIN" Value="BUGDATA.SEVERITY" Roundtrip="True"/>
  50.       </FIELD>
  51.       <FIELD attrname="STATUS" fieldtype="i2">
  52.         <PARAM Name="ORIGIN" Value="BUGDATA.STATUS" Roundtrip="True"/>
  53.       </FIELD>
  54.       <FIELD attrname="STEPS" fieldtype="bin.hex" SUBTYPE="Text" WIDTH="8">
  55.         <PARAM Name="ORIGIN" Value="BUGDATA.STEPS" Roundtrip="True"/>
  56.       </FIELD>
  57.       <FIELD attrname="VERIFICATION" fieldtype="i2">
  58.         <PARAM Name="ORIGIN" Value="BUGDATA.VERIFICATION" Roundtrip="True"/>
  59.       </FIELD>
  60.       <FIELD attrname="VERSION" fieldtype="string" WIDTH="10">
  61.         <PARAM Name="ORIGIN" Value="BUGDATA.VERSION" Roundtrip="True"/>
  62.       </FIELD>
  63.       <FIELD attrname="WORKAROUND" fieldtype="bin.hex" SUBTYPE="Text" WIDTH="8">
  64.         <PARAM Name="ORIGIN" Value="BUGDATA.WORKAROUND" Roundtrip="True"/>
  65.       </FIELD>
  66.       <FIELD attrname="USER_ID" fieldtype="i4">
  67.         <PARAM Name="ORIGIN" Value="BUGDATA.USER_ID" Roundtrip="True"/>
  68.       </FIELD>
  69.       <FIELD attrname="FIRST_NAME" fieldtype="string" WIDTH="32">
  70.         <PARAM Name="ORIGIN" Value="USERS.FIRST_NAME" Roundtrip="True"/>
  71.       </FIELD>
  72.       <FIELD attrname="LAST_NAME" fieldtype="string" WIDTH="32">
  73.         <PARAM Name="ORIGIN" Value="USERS.LAST_NAME" Roundtrip="True"/>
  74.       </FIELD>
  75.       <FIELD attrname="DUPLICATEOF" fieldtype="i4">
  76.         <PARAM Name="ORIGIN" Value="BUGDATA.DUPLICATEOF" Roundtrip="True"/>
  77.       </FIELD>
  78.       <FIELD attrname="RATING" fieldtype="r8"/>
  79.       <FIELD attrname="MY_RATING" fieldtype="i2"/>
  80.       <FIELD attrname="VOTES" fieldtype="i4"/>
  81.       <FIELD attrname="MY_VOTES" fieldtype="i4"/>
  82.       <FIELD attrname="MY_NOTIFY" fieldtype="i2"/>
  83.       <FIELD attrname="SHORT_DESCRIPTION" fieldtype="string" WIDTH="250">
  84.         <PARAM Name="ORIGIN" Value="BUGDATA.SHORT_DESCRIPTION" Roundtrip="True"/>
  85.       </FIELD>
  86.       <FIELD attrname="RAIDED" fieldtype="string" SUBTYPE="FixedChar" WIDTH="1">
  87.         <PARAM Name="ORIGIN" Value="BUGDATA.RAIDED" Roundtrip="True"/>
  88.       </FIELD>
  89.       <FIELD attrname="PUBLIC" fieldtype="i4">
  90.         <PARAM Name="ORIGIN" Value="BUGDATA.PUBLIC" Roundtrip="True"/>
  91.       </FIELD>
  92.       <FIELD attrname="TOTALRATINGS" fieldtype="i4"/>
  93.       <FIELD attrname="MODIFIED_DATE" fieldtype="dateTime">
  94.         <PARAM Name="ORIGIN" Value="BUGDATA.MODIFIED_DATE" Roundtrip="True"/>
  95.       </FIELD>
  96.       <FIELD attrname="UNPROCESSED_WORKAROUNDS" fieldtype="i4"/>
  97.       <FIELD attrname="NEEDS_ATTENTION" fieldtype="boolean"/>
  98.       <FIELD attrname="RAID_NO" fieldtype="i4" readonly="true">
  99.         <PARAM Name="SERVER_CALC" Value="TRUE" Type="boolean" Roundtrip="True"/>
  100.       </FIELD>
  101.       <FIELD attrname="LOCALE" fieldtype="i2">
  102.         <PARAM Name="ORIGIN" Value="BUGDATA.LOCALE" Roundtrip="True"/>
  103.       </FIELD>
  104.       <FIELD attrname="qryResInfo" fieldtype="nested">
  105.         <FIELDS>
  106.           <FIELD attrname="BUILD" fieldtype="string" WIDTH="15">
  107.             <PARAM Name="ORIGIN" Value=""RESINFO"."BUILD"" Roundtrip="True"/>
  108.           </FIELD>
  109.           <FIELD attrname="CHANGED_BY" fieldtype="string" WIDTH="25">
  110.             <PARAM Name="ORIGIN" Value=""RESINFO"."CHANGED_BY"" Roundtrip="True"/>
  111.           </FIELD>
  112.           <FIELD attrname="COMMENT" fieldtype="bin.hex" SUBTYPE="Text" WIDTH="8">
  113.             <PARAM Name="ORIGIN" Value=""RESINFO"."COMMENT"" Roundtrip="True"/>
  114.           </FIELD>
  115.           <FIELD attrname="DATE_CHANGED" fieldtype="dateTime">
  116.             <PARAM Name="ORIGIN" Value=""RESINFO"."DATE_CHANGED"" Roundtrip="True"/>
  117.           </FIELD>
  118.           <FIELD attrname="DEFECT_NO" fieldtype="i4">
  119.             <PARAM Name="ORIGIN" Value=""RESINFO"."DEFECT_NO"" Roundtrip="True"/>
  120.           </FIELD>
  121.           <FIELD attrname="REC_NO" fieldtype="i2">
  122.             <PARAM Name="ORIGIN" Value=""RESINFO"."REC_NO"" Roundtrip="True"/>
  123.           </FIELD>
  124.           <FIELD attrname="RESOLUTION" fieldtype="i2">
  125.             <PARAM Name="ORIGIN" Value=""RESINFO"."RESOLUTION"" Roundtrip="True"/>
  126.           </FIELD>
  127.           <FIELD attrname="FIRST_NAME" fieldtype="string" WIDTH="32">
  128.             <PARAM Name="ORIGIN" Value=""USERS"."FIRST_NAME"" Roundtrip="True"/>
  129.           </FIELD>
  130.           <FIELD attrname="LAST_NAME" fieldtype="string" WIDTH="32">
  131.             <PARAM Name="ORIGIN" Value=""USERS"."LAST_NAME"" Roundtrip="True"/>
  132.           </FIELD>
  133.           <FIELD attrname="RES_TYPE" fieldtype="i2">
  134.             <PARAM Name="ORIGIN" Value=""RESINFO"."RES_TYPE"" Roundtrip="True"/>
  135.           </FIELD>
  136.         </FIELDS>
  137.         <PARAMS/>
  138.       </FIELD>
  139.       <FIELD attrname="qryComment" fieldtype="nested">
  140.         <FIELDS>
  141.           <FIELD attrname="COMMENT" fieldtype="bin.hex" SUBTYPE="Text" WIDTH="8">
  142.             <PARAM Name="PROVFLAGS" Value="1" Type="i4" Roundtrip="True"/>
  143.             <PARAM Name="ORIGIN" Value=""GET_COMMENTS"."COMMENT"" Roundtrip="True"/>
  144.           </FIELD>
  145.           <FIELD attrname="COMMENTED" fieldtype="dateTime">
  146.             <PARAM Name="ORIGIN" Value=""GET_COMMENTS"."COMMENTED"" Roundtrip="True"/>
  147.           </FIELD>
  148.           <FIELD attrname="COMMENTID" fieldtype="i4">
  149.             <PARAM Name="ORIGIN" Value=""GET_COMMENTS"."COMMENTID"" Roundtrip="True"/>
  150.           </FIELD>
  151.           <FIELD attrname="DEFECT_NO" fieldtype="i4">
  152.             <PARAM Name="ORIGIN" Value=""GET_COMMENTS"."DEFECT_NO"" Roundtrip="True"/>
  153.           </FIELD>
  154.           <FIELD attrname="PARENTID" fieldtype="i4">
  155.             <PARAM Name="ORIGIN" Value=""GET_COMMENTS"."PARENTID"" Roundtrip="True"/>
  156.           </FIELD>
  157.           <FIELD attrname="FIRST_NAME" fieldtype="string" WIDTH="32">
  158.             <PARAM Name="ORIGIN" Value=""GET_COMMENTS"."FIRST_NAME"" Roundtrip="True"/>
  159.           </FIELD>
  160.           <FIELD attrname="LAST_NAME" fieldtype="string" WIDTH="32">
  161.             <PARAM Name="ORIGIN" Value=""GET_COMMENTS"."LAST_NAME"" Roundtrip="True"/>
  162.           </FIELD>
  163.           <FIELD attrname="PUBLISH" fieldtype="string" SUBTYPE="FixedChar" WIDTH="1">
  164.             <PARAM Name="ORIGIN" Value=""GET_COMMENTS"."PUBLISH"" Roundtrip="True"/>
  165.           </FIELD>
  166.         </FIELDS>
  167.         <PARAMS/>
  168.       </FIELD>
  169.     </FIELDS>
  170.     <PARAMS PRIMARY_KEY="6"/>
  171.   </METADATA>
  172.   <ROWDATA>
  173.     <ROW AREAID="41" BUILD_NO="7.0.4.453" DATA_TYPE="A" DATE_REPORTED="20030505T14:22:05000" DEFECT_NO="4319" DESCRIPTION="On Windows Server 2003, calls to SysUtils.GetEnvironmentVariable will fail with an access violation when the requested environment variable does not exist. Evidently, Windows Server 2003 evaluates the options passed in to the Win32 version of GetEnvironmentVariable differently than previous versions of Windows do. Instead of returning 0 (zero) as the length for a request to retrieve a missing environment variable, it returns a 1 (one) which is indicates an error condition, because the Delphi routine passed in a zero-length string instead of one that is pre-allocated. I have attached a work-around." PLATFORM="10" PROJECT="10" INTERNAL_NO="163462" SEVERITY="0" STATUS="10" STEPS="1. File|New Application 2. Drop two TEdit components on the form 3. Drop a TButton 4. Double click on the TButton, and put in the following code for the event:   Edit2.Text := '"' + GetEnvironmentVariable(Edit1.Text) + '"'; so you can see the full result of the call (on an operating system where the call works) 5. Run the application 6. Put a non-existent environment variable name in Edit1 7. Click the button. 8. See the crash NOTE: If you do *not* see the crash in a GUI application, try making the call with a CGI application instead" VERSION="7.0" WORKAROUND="This is the version that is checked in for Delphi 8 function GetEnvironmentVariable(const Name: string): string; const   BufSize = 1024; var   Len: Integer;   Buffer: array[0..BufSize - 1] of Char; begin   Result := '';   Len := GetEnvironmentVariable(PChar(Name), @Buffer, BufSize);   if Len < BufSize then     SetString(Result, PChar(@Buffer), Len)   else   begin     SetLength(Result, Len - 1);     GetEnvironmentVariable(PChar(Name), PChar(Result), Len);   end; end; " USER_ID="9" FIRST_NAME="John" LAST_NAME="Kaster" RATING="4" VOTES="0" MY_VOTES="0" SHORT_DESCRIPTION="GetEnvironmentVariable fails for missing variables on Windows Server 2003" TOTALRATINGS="5" MODIFIED_DATE="20030520T11:01:21000" UNPROCESSED_WORKAROUNDS="0" RAID_NO="-1" LOCALE="10">
  174.       <qryResInfo/>
  175.       <qryComment>
  176.         <ROWqryComment COMMENT="The documentation says: "If the buffer pointed to by lpBuffer is not large enough, the return value is the buffer size, in characters, required to hold the value string and its terminating null character. " So, if the return value is 1, it is just for terminating null char. I don't know, if that means that the value does not exist or that value is empty, but the code should handle it:   Result := '';   Len := GetEnvironmentVariable(PChar(Name), nil, 0);   if Len > 0 then   begin     SetLength(Result, Len);     GetEnvironmentVariable(PChar(Name), PChar(Result), Len);     SetLength(Result, Len-1);   end; ------------ In your workaround the second call to GetEnvironmentVariable is not needed if len<BufSize" COMMENTED="20030506T04:42:18000" COMMENTID="7555" DEFECT_NO="4319" PARENTID="-1" FIRST_NAME="Robert" LAST_NAME="Cerny" PUBLISH="T"/>
  177.         <ROWqryComment COMMENT="The bug is actually here:     SetLength(Result, Len - 1); If len=1, this sets length to 0, which sets result to nil, cast to PChar returns a pointer to readonly null char, which causes AV when second call to GetEnvironmentVariable tries to write one byte to it." COMMENTED="20030506T04:52:03000" COMMENTID="7556" DEFECT_NO="4319" PARENTID="-1" FIRST_NAME="Robert" LAST_NAME="Cerny" PUBLISH="T"/>
  178.         <ROWqryComment COMMENT="Good point about my workaround. I'll make sure that the second call isn't made. I suppose I should have chewed on it a little longer, and debugged into the code call. Debugging a CGI is rarely fun, especially when it crashes." COMMENTED="20030506T16:33:02000" COMMENTID="7571" DEFECT_NO="4319" PARENTID="7555" FIRST_NAME="John" LAST_NAME="Kaster" PUBLISH="T"/>
  179.         <ROWqryComment COMMENT="I've approved the workaround for the version that will be in Delphi 8." COMMENTED="20030507T12:31:43000" COMMENTID="7593" DEFECT_NO="4319" PARENTID="7556" FIRST_NAME="John" LAST_NAME="Kaster" PUBLISH="T"/>
  180.       </qryComment>
  181.     </ROW>
  182.     <ROW AREAID="241" BUILD_NO="6.0.6.240" DATA_TYPE="C" DATE_REPORTED="20020404T19:39:28000" DEFECT_NO="466" DESCRIPTION="There is     procedure PSSetCommandText(const CommandText: string); but no PSGetCommandText, so you cannot implement generic SQL processing routines that need to know what the command text currently is. " PLATFORM="430" PROJECT="10" SEVERITY="1" STATUS="40" VERSION="6.0" USER_ID="9" FIRST_NAME="John" LAST_NAME="Kaster" RATING="3.727272727272727" VOTES="1" MY_VOTES="0" SHORT_DESCRIPTION="IProviderSupport needs PSGetCommandText" TOTALRATINGS="11" MODIFIED_DATE="20030502T12:58:35000" UNPROCESSED_WORKAROUNDS="0" LOCALE="10">
  183.       <qryResInfo/>
  184.       <qryComment/>
  185.     </ROW>
  186.     <ROW AREAID="241" BUILD_NO="6.0.6.240" DATA_TYPE="C" DATE_REPORTED="20020404T14:10:18000" DEFECT_NO="460" DESCRIPTION="The IProviderSupport interface has no GUID, so you cannot QueryInterface or use Supports on it. This prevents client code from safely using this interface from a random TDataSet descendant." PLATFORM="10" PROJECT="10" INTERNAL_NO="127134" RESOLUTION="10" RESOLVED_IN_BUILD="7.0.4.453" SEVERITY="1" STATUS="30" VERSION="6.0" USER_ID="9" FIRST_NAME="John" LAST_NAME="Kaster" RATING="4.111111111111111" VOTES="1" MY_VOTES="0" SHORT_DESCRIPTION="IProviderSupport has no GUID" RAIDED="F" TOTALRATINGS="18" MODIFIED_DATE="20030502T12:58:35000" UNPROCESSED_WORKAROUNDS="0" RAID_NO="-1" LOCALE="10">
  187.       <qryResInfo>
  188.         <ROWqryResInfo BUILD="7.0.4.453" CHANGED_BY="171" DATE_CHANGED="20020902T07:02:22000" DEFECT_NO="460" REC_NO="0" RESOLUTION="10" FIRST_NAME="Jeff" LAST_NAME="Overcash" RES_TYPE="0"/>
  189.       </qryResInfo>
  190.       <qryComment>
  191.         <ROWqryComment COMMENT="There is no need for a GUID since TDataset implement IProviderSupport so all datasets implement it, even with stub methods. To get an IProviderSupport interface from a random dataset use a static typecast:   IProviderSupport(Dataset).PSSetCommandText(MyCommandText); To find if a dataset supports provider-related functionality like SQL execution use the appropriate methods of IProviderSupport like PSIsSQLBased and PSIsSQLSupported.   with IProviderSupport(Dataset) do     if PSIsSQLSupported then       PSExecuteStatement(SQL, Params)     else       Database Error('Dataset does not support SQL', Dataset);" COMMENTED="20020628T06:25:19000" COMMENTID="2623" DEFECT_NO="460" PARENTID="-1" FIRST_NAME="Constantine" LAST_NAME="Yannakopoulos" PUBLISH="T"/>
  192.         <ROWqryComment COMMENT="IProviderSupport isn't just for DataSets. QueryInterface must be supported for it." COMMENTED="20030418T10:37:58000" COMMENTID="7311" DEFECT_NO="460" PARENTID="2623" FIRST_NAME="John" LAST_NAME="Kaster" PUBLISH="T"/>
  193.       </qryComment>
  194.     </ROW>
  195.   </ROWDATA>
  196. </DATAPACKET>
  197.